Image encoding and decoding apparatus, and image encoding and decoding method using contour mode based intra prediction

ABSTRACT

According to the present invention, an adaptive scheme is applied to an image encoding apparatus that includes an inter-predictor, an intra-predictor, a transformer, a quantizer, an inverse quantizer, and an inverse transformer, wherein input images are classified into two or more different categories, and two or more modules from among the inter-predictor, the intra-predictor, the transformer, the quantizer, and the inverse quantizer are implemented to perform respective operations in different schemes according to the category to which an input image belongs. Thus, the invention has the advantage of efficiently encoding an image without the loss of important information as compared to a conventional image encoding apparatus which adopts a packaged scheme.

CLAIM FOR PRIORITY

This application is a Continuation of U.S. patent application Ser. No.15/262,530, filed on Sep. 12, 2016, which is a Continuation of U.S.patent application Ser. No. 14/381,378 having a 371(c) date of Nov. 17,2014, now abandoned, which is a National Stage of InternationalApplication No. PCT/KR2013/001551, filed Feb. 27, 2013 and published asWO 2013/129822 on Sep. 6, 2013, which claims priority to Korean PatentApplications Nos. 10-2012-0019663 filed on Feb. 27, 2012 and10-2012-0106279 filed on Sep. 25, 2012 in the Korean IntellectualProperty Office (KIPO), the entire contents of which are herebyincorporated by reference.

BACKGROUND 1. Technical Field

Example embodiments of the present invention relate in general to thefield of a video encoding/decoding apparatus and more specifically to anapparatus for classifying input images into two or more differentcategories according to preset attributes and encoding/decoding theimages according to the categories of the input images.

2. Related Art

H.264/advanced video coding (AVC) is a standard of a video coder anddecoder (CODEC) having a highest compression rate among currentlystandardized CODECs. In order to improve compression efficiency,predictive encoding is performed on an image using intra-predictionconsidering directivity, an integer transform in units of 4×4 pixels,block modes having various sizes of 16×16 pixels to 4×4 pixels, or adeblocking filter in the H.264/AVC standard. In addition, in order tofind a more accurate motion vector, motion estimation is performed byinterpolating an image in units of ½ pixels and units of ¼ pixels in theH.264/AVC standard.

FIG. 1 is a block configuration diagram schematically illustrating aconventional video encoding apparatus, and illustrates a configurationof an example of the encoding apparatus according to the above-describedH.264/AVC.

As an apparatus for encoding the image, the conventional video encodingapparatus 100 may be configured to include a predictor 110, a subtractor120, a transformer 130, a quantizer 140, an encoder 150, an inversequantizer 160, an inverse transformer 170, an adder 180, and a referenceimage memory 190.

Hereinafter, an input video to be described is constituted of a seriesof images and each image is divided into predetermined regions such asblocks.

The predictor 110 includes an intra-predictor for intra-prediction andan inter-predictor for inter-prediction. In particular, theinter-predictor generates a predicted image of the input video using amotion vector of the input video determined according to a motion vectorresolution group including a plurality of motion vector resolutions.

The intra-predictor is used for the intra-block and intra-predictiveencoding is a scheme of generating a predicted block (image) bypredicting the pixel of the current block using pixels of previouslyencoded blocks within a current image to be currently encoded andrestored blocks after decoding and encoding a difference value from thepixel of the current block.

The inter-predictor is used for the inter-block and the inter-predictionrefers to a scheme of generating a predicted block by referring to oneor more past or future images and predicting a current block within acurrent image and encoding a difference value from the current block. Animage to be referred to encode or decode the current image is referredto as a reference image.

The subtractor 120 generates a residual image by performing asubtraction operation on an input image to be currently encoded and apredicted image, and the residual image includes a residual signal whichis a difference between a pixel of the input image and a pixel of thepredicted image.

The transformer 130 generates a transformed image having a transformcoefficient by transforming the residual signal of the residual imagegenerated by the subtractor 120 into a frequency domain through a schemesuch as a Hadamard transform or a discrete cosine transform (DCT). Thequantizer 140 generates a quantized transformed image by quantizing thetransformed image generated by the transformer 130 through a scheme suchas dead zone uniform threshold quantization (DZUTQ), a quantizationweighted matrix, or rate-distortion optimized quantization (RDOQ).

The encoder 150 encodes the quantized transformed image and generates abit stream including encoded data for motion vector resolution. Encodingtechnology applicable to the encoder 150 is entropy encoding technologyor the like.

The inverse quantizer 160 and the inverse transformer 170 restore aresidual image by performing inverse quantization and transformprocesses on some or all quantized transformed images to be transferredfrom the transformer 130 and the quantizer 140 described above. At thistime, the inverse quantizer 160 and the inverse transformer 170 mayrestore the residual image by inversely performing the transform andquantization schemes in the transformer 130 and the quantizer 140described above.

The adder 180 is an apparatus for restoring an input image by adding therestored residual image to the predicted image generated by thepredictor 110, and the reference image memory 190 may not only store areference image configured by accumulating restored input images inunits of images, but also transfer the reference image stored to predictthe next input image so that the above-described predictor 110 utilizesthe reference image.

On the other hand, when high efficiency video coding (HEVC), thestandardization of which has recently progressed, is used, moreefficient encoding than that of the conventional H.264/AVC may beperformed. According to the HEVC, the predictor 110 may performintra-prediction considering various directivities, the transformer 130may perform a transform operation in a residual quadtree transform (RQT)scheme, and the reference image memory 190 may store a filtered imagethrough an adaptive loop filter (ALF) or sample adaptive offset (SAO)scheme as well as conventional deblocking filtering on a residual imagerestored from the inverse quantizer 160 and the inverse transformer 170.

In addition, FIG. 4 is a block configuration diagram schematicallyillustrating a conventional video decoding apparatus, and illustrates aconfiguration of an example of the decoding apparatus according to theabove-described H.264/AVC or HEVC standard or a previous standard.

The conventional video decoding apparatus 400 may be configured toinclude a decoder 410, an inverse quantizer 420, an inverse transformer430, an adder 440, a predictor 450, and a reference image memory 460.

The decoder 410 may restore the quantized transformed image as well asmotion vector resolution by decoding encoded data extracted from thebitstream and perform a decoding process by inversely performing theencoding process of the encoder 150 described above with reference toFIG. 1 .

The inverse quantizer 420 and the inverse transformer 430 may restore aresidual image having a residual signal by inversely quantizing andinversely transforming the quantized transformed image and perform theinverse quantization and the inverse transform by inversely performingthe transform by the transformer 130 and the quantization by thequantizer 140 described above with reference to FIG. 1 .

The adder 440 may restore an image by adding the residual image restoredby the inverse quantizer 420 and the inverse transformer 430 describedabove to the predicted image generated from the predictor 450 to bedescribed below. The adder 440 may output a restored image byaccumulating images in units of images or store the images in thereference image memory 460 to utilize the stored images so as to predictthe next image.

The predictor 450 generates a predicted block by compensating formotions of blocks to be encoded using the motion vector restored by thedecoder 410. A group of predicted blocks grouped in a predeterminedencoding unit is configured.

However, the conventional video encoding/decoding apparatus describedabove has a disadvantage in that motion prediction and compensation,transform and quantization, inverse transform and inverse quantization,and encoding or decoding operations to which given schemes are fixedlyapplied are performed on all input images.

In other words, each image has a different attribute or characteristic.For example, when a general natural image is compared to an imagecontaining content such as text, graphic, and lines, there is adifference in that the latter includes more edge components because aboundary is shown to be enhanced as compared to the former. Theconventional video encoding/decoding apparatus has a problem in that themotion prediction and compensation, transform and quantization, inversetransform and inverse quantization, and encoding or decoding operationsare performed on all input images including the two images in a packagedscheme.

In relation to this, Korean Patent Application Publication No.10-2010-0045549 (Title of the invention: Method and apparatus forencoding/decoding an image using an adaptive interpolation filtercoefficient) discloses technology for interpolating a reference image byadaptively determining a coefficient of an interpolation filter forevery frame. However, there is still a limitation in this conventionaltechnology which targets only a specific part or a very narrow part inall encoding/decoding processes on an image.

SUMMARY

Accordingly, example embodiments of the present invention are providedto substantially obviate one or more problems due to limitations anddisadvantages of the related art.

Example embodiments of the present invention provide a videoencoding/decoding apparatus and a video encoding/decoding method usingan adaptive scheme in which the video encoding/decoding apparatus moreefficiently encodes/decodes images by classifying input images into twoor more different categories according to preset attributes andencoding/decoding the classified images in different schemes accordingto the categories of the input images.

In some example embodiments, a video encoding apparatus includes: animage analyzer configured to analyze image characteristics for an inputimage in units of coding blocks and classify the coding blocks into twoor more categories based on the image characteristics; and a transformerconfigured to perform a transform by referring to the categories of thecoding blocks.

Here, the image characteristics may include information about at leastone of directivity, an edge component distribution, and a color formatof the image.

Here, the two or more categories are classified to include at least oneof screen content including text or graphics, a natural image, and adepth map.

Here, the video encoding apparatus may further include: a color formatconverter configured to convert color formats of the coding blocks byreferring to the categories of the coding blocks.

Here, the transformer may skip the transform by referring to thecategories of the coding blocks.

Here, the video encoding apparatus may further include: a quantizerconfigured to perform quantization by referring to the categories of thecoding blocks.

Here, the quantizer may skip the quantization by referring to thecategories of the coding blocks.

Here, the video encoding apparatus may further include: anintra-predictor configured to perform intra-prediction by referring tothe categories of the coding blocks; an inter-predictor configured toperform inter-prediction by referring to the categories of the codingblocks; and a filter configured to perform filtering by referring to thecategories of the coding blocks.

Here, the intra-predictor may skip the intra-prediction by referring tothe categories of the coding blocks, and the filter may changeresolution by referring to the categories of the coding blocks.

Here, the intra-predictor may perform the intra-prediction byrepresenting a pixel of the image by an index of a preset lookup table(LUT) when the category of the coding block is a depth map.

In other example embodiments, a video decoding apparatus includes: adecoder configured to calculate categories of coding blocks classifiedinto two or more categories based on image characteristics for an inputimage analyzed in units of coding blocks by decoding a bitstream; aninverse quantizer configured to perform inverse quantization byreferring to the categories of the coding blocks; and an inversetransformer configured to perform an inverse transform by referring tothe categories of the coding blocks.

Here, the decoder may calculate color formats of the coding blocks basedon the categories of the coding blocks.

Here, the inverse quantizer may skip the inverse quantization byreferring to the categories of the coding blocks

Here, the inverse transformer may skip the inverse transform byreferring to the categories of the coding blocks.

Here, the video decoding apparatus may further include: anintra-predictor configured to perform intra-prediction by referring tothe categories of the coding blocks; an inter-predictor configured toperform inter-prediction by referring to the categories of the codingblocks; and a filter configured to perform filtering by referring to thecategories of the coding blocks.

Here, the intra-predictor may skip the intra-prediction by referring tothe categories of the coding blocks, and the filter may changeresolution by referring to the categories of the coding blocks.

Here, the intra-predictor may perform the intra-prediction byrepresenting a pixel of the image by an index of an LUT when thecategory of the coding block is a depth map.

In still other example embodiments, a video decoding method includes:calculating categories of coding blocks classified into two or morecategories based on image characteristics for an input image analyzed inunits of coding blocks by decoding a bitstream; performing inversequantization by referring to the categories of the coding blocks; andperforming an inverse transform by referring to the categories of thecoding blocks.

According to the above-described example embodiments of the presentinvention, the video encoding/decoding apparatus to which an adaptivescheme is applied more efficiently encodes/decodes images by classifyinginput images into two or more different categories according to presetattributes and encoding/decoding the images in different schemes,thereby encoding/decoding the images more efficiently without loss ofimportant information than the conventional technology to which thepackaged scheme is applied.

BRIEF DESCRIPTION OF DRAWINGS

Example embodiments of the present invention will become more apparentby describing in detail example embodiments of the present inventionwith reference to the accompanying drawings, in which:

FIG. 1 is a block configuration diagram schematically illustrating aconventional video encoding apparatus;

FIG. 2 is a block configuration diagram schematically illustrating avideo encoding apparatus to which an adaptive scheme is appliedaccording to an example embodiment of the present invention;

FIG. 3 is a flowchart illustrating a video encoding method to which theadaptive scheme is applied according to an example embodiment of thepresent invention;

FIG. 4 is a block configuration diagram schematically illustrating aconventional video decoding apparatus;

FIG. 5 is a block configuration diagram schematically illustrating avideo decoding apparatus to which an adaptive scheme is appliedaccording to an example embodiment of the present invention; and

FIG. 6 is a flowchart illustrating a video decoding method to which theadaptive scheme is applied according to an example embodiment of thepresent invention.

DESCRIPTION OF EXAMPLE EMBODIMENTS

Example embodiments of the present invention are described below insufficient detail to enable those of ordinary skill in the art to embodyand practice the present invention. It is important to understand thatthe present invention may be embodied in many alternate forms and shouldnot be construed as limited to the example embodiments set forth herein.Elements of the example embodiments are consistently denoted by the samereference numerals throughout the drawings and detailed description.

In the present specification, when a constituent element “connects” oris “connected” to another constituent element, the constituent elementcontacts or is connected to the other constituent element not onlydirectly but also electrically through at least one of other constituentelements interposed therebetween. Also, when a part may “include” acertain constituent element, unless specified otherwise, it may not beconstrued to exclude another constituent element but may be construed tofurther include other constituent elements.

In general, a video may be constituted of a series of images and eachimage may be divided into predetermined regions such as blocks.

In addition, concepts of a coding unit (CU), a prediction unit (PU), anda transform unit (TU) are defined in HEVC, the standardization of whichis currently in progress. The CU is similar to an existing macroblock,but encoding may be performed while the magnitude of the CU is variablyadjusted. The PU may be determined in the CU which is no longer dividedand determined based on a prediction type and a PU splitting process.The TU is that for the transform and quantization and may be greaterthan the magnitude of the PU but may not be greater than the CU.Accordingly, in the present invention, the block may be understood as ameaning equivalent to a unit.

In addition, a block to be referred to encode or decode a current blockis referred to as a reference block and a pixel to be referred to encodeor decode a current pixel is referred to as a reference pixel. Inaddition, those skilled in the art may understand that the term “image”disclosed hereinafter may be replaced with other terms having themeanings equivalent to a picture, a frame, and the like.

In addition, in the specification of the present invention, the codingblock may be used as a concept including the CU, the PU, and TU. Theinput image may be constituted of at least one coding block.

In addition, various sizes of 4×4 to 64×64 and 128×128 may be used asthe size of the coding block.

Hereinafter, the present invention will be more specifically describedwith reference to the accompanying drawings.

FIG. 2 is a block configuration diagram schematically illustrating avideo encoding apparatus to which an adaptive scheme is appliedaccording to an example embodiment of the present invention.

The video encoding apparatus 200 to which the adaptive scheme is appliedaccording to the example embodiment of the present invention includes animage analyzer 201, a color format converter 205, an inter-predictor214, an intra-predictor 216, a transformer 220, a quantizer 230, aninverse quantizer 240, and an inverse transformer 250. The videoencoding apparatus 200 is technically characterized in that imagesclassified into two or more categories according to preset attributesare set as input images and a module including each module describedabove operates in a different scheme according to the category.

As described above, the image may be a general natural image, an imagecontaining content such as text, graphic, and lines, a depth map relatedto a multi-view video or a three-dimensional (3D) video signal, and thelike. Each of these images may have a different attribute andcharacteristic. In order to reduce inefficiency caused by a packagedscheme applied to all images, images are classified into two or morecategories according to preset attributes and input in the presentinvention and modules included in each configuration of the videoencoding apparatus according to an example embodiment of the presentinvention operate in different schemes according to the category. Here,an attribute associated with the input image is not limited to a specialspecific standard.

The image analyzer 201 may analyze image characteristics for inputimages in units of coding blocks and classify the coding blocks into twoor more categories based on the image characteristics.

The image analyzer 201 may analyze the image characteristics of theinput images in the units of coding blocks. In addition, the imageanalyzer 201 may determine a coding block-specific category based on theimage characteristics of the analyzed input image.

In the present invention, the categories may be classified into twotypes and the types of classified categories are not especially limited.

The classification of the categories may be determined based on imagecharacteristics according to probabilistic and statisticalcharacteristics and a signal model of an image signal such asdirectivity, an edge component distribution, and a color format of theimage.

In particular, screen content including text, graphics, lines, and thelike has different image characteristics from the general natural image.That is, because the screen content may have more edge components thanthe general natural image, the screen content may have morediscontinuous and sharp image characteristics than the general naturalimage.

In addition, although the depth map may have similar imagecharacteristics to the screen content in that the depth map isrepresented by a broad low-frequency domain and the edge component isclear because a brightness value rapidly varies, the depth map may havemore simplified image characteristics.

In detail, compared to the screen content, the depth map may beconfigured in a black-and-white format. That is, the depth map mayrepresent a depth value which is distance information as a luminancedifference. For example, in the depth map, a depth value for an objectmay have a smaller value than a depth value for a background.

In addition, although the depth map may be encoded by encoding the depthvalue itself, a signal represented by an index may be encoded after thedepth value is represented by a prepared LUT and the depth value of arelevant pixel or block is represented by an index of the LUT.

Accordingly, the screen content, the depth map, and the natural imagemay be included in different categories. The images may be encoded ordecoded by different methods according to the categories.

Because the image is encoded by the transform, the quantization, theintra-prediction, the inter-prediction, the filtering, and the like, itis possible to perform the transform, the quantization, theintra-prediction, the inter-prediction, and the filtering by differentmethods according to categories reflecting the image characteristics.

In addition, it is also important to determine an appropriate colorformat (or chroma format) according to image characteristics in a videoencoding process. For example, YUV444, YUV422, YUV420, or the like maybe used as the color format.

The color format converter 205 may convert the color format of thecoding block by referring to the category of the coding block. Forexample, YUV444 may or may not be transformed into YUV422 or YUV420.Encoding may be performed by applying the color format of YUV444 to thecoding block of the category corresponding to the screen content andapplying the color format of YUV422 or YUV420 to the coding block of thecategory corresponding to the general natural image.

In addition, because the depth image may be configured in theblack-and-white signal form without being configured in a colorcomponent, the depth map may be encoded by applying a color formatconstituted of only Y which is a brightness signal component.

The predictor 210 is configured to include a motion predictor 212configured to generate a motion vector of an input image, aninter-predictor 214 for inter-prediction, and an intra-predictor 216 forintra-prediction, and generates a predicted image of an input image byperforming intra- or inter-prediction.

The inter-predictor 214 is configured to include two or moreinter-prediction modules configured to generate a predicted block byreferring to one or more past or future images and predicting a currentblock within a current image and perform different inter-predictionsaccording to categories of the above-described input image (or codingblock). That is, the inter-predictor 214 receives a motion vectordetermined from the motion predictor 212 using a reference image to bereferred to encode or decode a current image stored in the memory 265and uses the received motion vector to generate a predicted block.

The inter-predictor 214 may perform the inter-prediction by referring tothe categories of the coding blocks divided by the image analyzer 201.

In particular, the inter-predictor 214 adaptively determines aninter-prediction module to be operated according to a category of aninput image (or coding block) and the inter-prediction module determinedfrom among two or more inter-prediction modules performsinter-prediction as in the following example. For example, the firstinter-prediction module performs inter-prediction by an inter-predictionscheme performed by the inter-predictor of the conventional videoencoding apparatus 100 illustrated in FIG. 1 and the secondinter-prediction module performs motion prediction and compensationafter enhancing an edge component of the reference image or performsinter-prediction through interpolation considering an edge at the timingof interpolating the reference image so as to effectively predict anedge of the current block, so that an operation may be optimallyperformed on an image containing content.

For example, the inter-predictor 214 may estimate motion in units ofsub-pixels after interpolating a signal of a ½ or ¼ pixel positionbetween integer pixels so as to efficiently eliminate a correlationbetween screens. That is, it is possible to select and use the mostappropriate interpolation filter among a large number of interpolationfilters according to characteristics of input images.

In addition, it is possible to select one of a plurality ofinterpolation filters according to a type of color format of an inputimage. At this time, it is possible to select and use one of a pluralityof interpolation filters for a brightness signal and select and use oneof a plurality of interpolation filters for a color signal.

In addition, when the input image is a depth map, it is possible toencode a residual depth value after generating a residual depth value bypredicting a depth value for a current encoding target image from areference depth map.

At this time, it is possible to create a residual signal through directprediction for the depth value itself. As another example embodiment,the depth value may be represented by a prepared lookup table (LUT). Inthis case, it is possible to use an index corresponding to a relevantdepth value in the LUT. That is, the predicted depth value and the depthvalue of the current block are all represented by indices of the LUT,and a residual signal may be a difference value between the indices.

In addition, the inter-predictor 214 may further include aninter-prediction module configured to perform inter-prediction in adifferent scheme from the first and second inter-prediction modules inaddition to the first and second inter-prediction modules illustrated inFIG. 2 .

The intra-predictor 216 is configured to include two or moreintra-prediction modules configured to generate a predicted block(image) by predicting a pixel of a current block using pixels ofpreviously encoded blocks within the current image to be currentlyencoded and pixels of blocks restored after decoding and performdifferent intra-predictions according to categories of theabove-described input image (or coding block).

The intra-predictor 216 may perform intra-prediction by referring to thecategory of the coding block classified by the image analyzer 201.

In particular, the intra-predictor 216 adaptively determines anintra-prediction module to be operated according to a category of aninput image (or coding block), and the intra-prediction moduledetermined from among two or more intra-prediction modules performsintra-prediction as in the following example. For example, the firstintra-prediction module performs intra-prediction by an intra-predictionscheme performed by the intra-predictor of the conventional videoencoding apparatus 100 illustrated in FIG. 1 and the secondintra-prediction module performs motion prediction by employing edgeinformation of blocks arranged around a current block or performingintra-prediction in which difference pulse code modulation (DPCM) isperformed in units of pixels, so that an operation may be optimallyperformed on an image containing content.

As another example embodiment of the second intra-prediction module,when the input image is a depth map, it is possible to encode a residualdepth value (depth value difference value) after generating a residualdepth value by predicting depth values of pixels within a currentencoding block from depth values of adjacent pixels of the currentblock.

At this time, it is possible to create a residual signal through directprediction for the depth value itself. As another example embodiment,the depth value may be represented by an LUT. In this case, it ispossible to use an index corresponding to a relevant depth value in theLUT. That is, the predicted depth value and the depth value of thecurrent block are all represented by indices of the LUT, and a residualsignal may be a difference value between the indices.

In addition, the intra-predictor 216 may further include anintra-prediction module configured to perform intra-prediction in adifferent scheme from the first and second intra-prediction modules inaddition to the first and second intra-prediction modules illustrated inFIG. 2 .

For example, when the input image is a depth map, the intra-predictor216 may perform intra-prediction based on an edge-based contour orregion division and skip the intra-prediction on the depth map.

The transformer 220 is configured to include two or more transformmodules configured to generate a transformed image by transforming aresidual image including a residual signal generated by the subtractor215 into a frequency domain and perform different transform operationsaccording to categories of the above-described input image (or codingblock).

The transformer 220 may perform a transform by referring to a categoryof the coding block. In addition, the transformer 220 may skip thetransform by referring to the category of the coding block.

For example, the transformer 220 may transform a coding block of arelevant category corresponding to a general natural image and skip thetransform on the coding block of the category corresponding to thescreen content or the depth map.

In addition, the transformer 220 may make transforms for the residualsignal by the inter-prediction and the residual signal by theintra-prediction different. For example, it is possible to skip thetransform on the residual signal by the intra-prediction for the codingblock of the category corresponding to the screen content or the depthmap and perform the transform on the residual signal by theinter-prediction for the coding block of the category corresponding tothe screen content or the depth map.

In addition, it is possible to adaptively determine whether to performthe transform and a transform method according to rate distortionoptimization.

Accordingly, in the present invention, it is possible to adaptivelydetermine whether to perform the transform and a transform method inconsideration of categories based on image characteristics and whetherto perform the transform and the transform method are not especiallylimited.

In particular, the transformer 220 adaptively determines a transformmodule to be operated according to a category of an input image (orcoding block) and the transform module determined from among two or moretransform modules performs the transform as in the following example.For example, the first transform module performs a transform operationby a transform scheme (Hadamard transform, DCT, DST, or the like)performed by the conventional transformer 130 illustrated in FIG. 1 andthe second transform module does not perform the transform or performsonly a one-dimensional (1D) transform different from the two-dimensional(2D) transform of the first transform module so as to maximize codingefficiency or image quality, so that an operation may be optimallyperformed on an image containing content. In addition, the transformer220 may further include a transform module configured to perform thetransform operation in a different scheme from the first and secondtransform modules in addition to the first and second transform modulesillustrated in FIG. 2 .

The quantizer 230 is configured to include two or more quantizationmodules configured to generate a quantized transformed image byquantizing the transformed image generated by the transformer 220 andperform different quantization operations according to categories of theabove-described input image (or coding block).

That is, the quantizer 230 may perform quantization by referring to acategory of the coding block. In addition, the quantizer 230 may skipthe quantization by referring to the category of the coding block.

For example, the quantizer 230 may quantize a coding block of a relevantcategory corresponding to a general natural image and skip thequantization on the coding block of the category corresponding to thescreen content or the depth map.

In particular, the quantizer 230 adaptively determines a quantizationmodule to be operated according to a category of an input image (orcoding block) and the quantization module determined from among two ormore quantization modules performs the quantization as in the followingexample. For example, the first quantization module performs aquantization operation by a quantization scheme (DZUTQ, a quantizationweighted matrix, RDOQ, or the like) performed by the conventionalquantizer 140 illustrated in FIG. 1 and the second quantization modulemay or may not quantize a predicted residual signal which is nottransformed so as to effectively save important information and performsnon-uniform quantization on a transform coefficient, so that anoperation may be optimally performed on an image containing content. Inaddition, the quantizer 230 may further include a quantization moduleconfigured to perform the quantization operation in a different schemefrom the first and second quantization modules in addition to the firstand second quantization modules illustrated in FIG. 2 .

The inverse quantizer 240 and the inverse transformer 250 restore aresidual image by performing the inverse quantization and the inversetransform on some or all quantized transformed images transferred fromthe transformer 220 and the quantizer 230 described above. The inversequantizer 240 is configured to include two or more inverse quantizationmodules configured to perform different inverse quantization operationsaccording to categories of the above-described input image (or codingblock). The inverse transformer 250 is configured to include two or moreinverse transform modules configured to perform different inversetransform operations according to categories of the above-describedinput image (or coding block).

In particular, the inverse quantizer 240 and the inverse transformer 250adaptively determine an inverse quantization module and an inversetransform module to be operated according to a category of an inputimage (or coding block), respectively, the inverse quantization moduledetermined from among two or more inverse quantization modules performsinverse quantization as in the following example, and the inversetransform module determined from among two or more inverse transformmodules performs an inverse transform as in the following example. Forexample, the first inverse quantization module and the first inversetransform module perform an inverse quantization operation in theinverse quantization scheme performed by the conventional inversequantizer 160 illustrated in FIG. 1 and an inverse transform operationin the inverse transform scheme performed by the conventional inversetransformer 170, respectively, the second inverse quantization moduleperforms the inverse quantization as in the second quantization module,and the second inverse transform module performs the inverse transformas in the second transform module, so that an operation may be optimallyperformed on an image containing content. In addition, the inversequantizer 240 and the inverse transformer 250 may further include aninverse quantization module configured to perform the inversequantization operation in a different scheme from the first and secondinverse quantization modules in addition to the first and second inversequantization modules illustrated in FIG. 2 and an inverse transformmodule configured to perform the inverse transform operation in adifferent scheme from the first and second inverse transform modules inaddition to the first and second inverse transform modules illustratedin FIG. 2 , respectively.

More preferably, the video encoding apparatus to which the adaptivescheme is applied according to the example embodiment of the presentinvention further includes a filter 260. The filter 260 may beconfigured to include two or more filtering modules configured toperform an operation of reducing distortion caused while encoding animage restored from the adder 255 in a given region unit and performdifferent filtering operations according to categories of theabove-described input image (or coding block).

The filter 260 may perform filtering by referring to the category of thecoding block.

In particular, the filter 260 adaptively determines a filtering moduleto be operated according to the category of the input image (or codingblock) and a filtering module determined from among the two or morefiltering modules performs a filtering operation as in the followingexample.

For example, the first filtering module performs a filtering operationby a filtering scheme (deblocking filtering, ALF, SAO, or the like)performed by the conventional filter and the second filtering moduleselects and performs one of schemes of the first filtering module orfilters or performs filtering by a filter set in which specific filtersare combined so as to maximize image quality, so that an operation maybe optimally performed on an image containing content. In addition, thefilter 260 may further include a filtering module configured to performthe filtering operation in a different scheme from the first and secondfiltering modules in addition to the first and second filtering modulesillustrated in FIG. 2 .

In addition, when the input image is a depth map, the filter 260 mayperform down-sampling or up-sampling on the depth map. That is, thefilter 260 may change the resolution of the depth map throughre-sampling on the depth map.

In addition, the encoder 235 of the present invention generates abitstream including encoded data by receiving a quantized transformedimage from the quantizer 230 and encoding the quantized transformedimage through entropy encoding technology or the like.

In addition, when technology according to the plurality of encodingmethods described above is applied, a flag bit representing the appliedencoding technology may be transmitted for every coding block or flagbits may be grouped and transmitted in a larger block unit. Flagsgrouped in the larger block unit may be encoded and then transmitted.

When the video encoding apparatus to which an adaptive scheme is appliedaccording to an example embodiment of the present invention configuredas described above is used, it is possible to perform efficient videoencoding without loss of important information by obtaining encoded dataaccording to different schemes classified according to categories inwhich attributes of input images are reflected.

FIG. 3 is a flowchart illustrating a video encoding method to which theadaptive scheme is applied according to an example embodiment of thepresent invention.

Referring to FIG. 3 , the video encoding method according to the exampleembodiment of the present invention may be performed by theabove-described video encoding apparatus. Accordingly, theabove-described example embodiment associated with the video encodingapparatus may be applied to the video encoding method.

The video encoding method to which the adaptive scheme is appliedaccording to the example embodiment of the present invention ischaracterized in that an input image (or coding block) is classifiedinto two or more categories according to a preset attribute and a schemeto be performed for each process associated with encoding adaptivelychanges according to the category.

Image characteristics for an input image may be analyzed in units ofcoding blocks, the coding blocks may be classified into two or morecategories based on the image characteristics, and color formats of thecoding blocks may be converted by referring to the categories of thecoding blocks (S300). Here, the image characteristics may includeinformation about at least one of directivity, an edge componentdistribution, and a color format of the image. The two or morecategories may be classified to include at least one of screen contentincluding text or graphics, a natural image, and a depth map.

In order to generate a predicted image of an input image, the predictorperforms inter-prediction by two or more inter-prediction schemesdifferent from each other according to a category of an input image (orcoding block) or performs intra-prediction by two or moreintra-prediction schemes different from each other (S310). A residualimage is generated by performing a subtraction operation on the inputimage and the predicted image generated by the predictor (S320). Inparticular, when the input image is a depth map, the intra-predictionmay be performed based on an edge-based contour or region division andthe intra-prediction for the depth map may be skipped.

Subsequently, after the transform operation by two or more transformschemes different from each other according to a category of an inputimage (or coding block) using the generated residual image, a quantizedtransformed image is generated by performing quantization operations bytwo or more quantization schemes different from each other according tothe category of the input image (or coding block) using the transformedimage generated by the transformer (S330).

For example, it is possible to transform a coding block of a categorycorresponding to a general natural image and skip the transform on thecoding block of the category corresponding to the screen content or thedepth map and it is possible to quantize the coding block of thecategory corresponding to the general natural image and skip thequantization on the coding block of the category corresponding to thescreen content or the depth map.

After inverse quantization by two or more inverse quantization schemesdifferent from each other according to the category of theabove-described input image (or coding block) using the quantizedtransformed image, a residual image is restored by performing inversetransforms by two or more inverse transform schemes different from eachother according to the category of the input image (or coding block)using the transformed image generated by the inverse quantizer, thepredicted image is added to the restored residual image, and an addingresult is stored in the memory (S340). It is possible to use a referenceimage stored in the memory for motion prediction of the input image ifnecessary thereafter and generate a residual image using a predictedimage generated again.

The encoder generates a bitstream including encoded data using variousencoding technologies from the quantized transformed image generatedthrough the above process (S350).

In addition, before an input image restored by adding the predictedimage to the restored residual image is stored in the memory, it ispossible to additionally perform filtering processes by two or morefiltering schemes different from each other according to the category ofthe input image (or coding block).

By performing each step for an input image according to the adaptivescheme, it is possible to obtain the encoded data of more improvedefficiency than the conventional encoding method and reduce an importantinformation loss rate.

On the other hand, FIG. 5 is a block configuration diagram schematicallyillustrating a video decoding apparatus to which an adaptive scheme isapplied according to an example embodiment of the present invention.

A video decoding apparatus 500 to which the adaptive scheme is appliedaccording to the example embodiment of the present invention includes adecoder 505, an inverse quantizer 510, an inverse transformer 520, aninter-predictor 534, and an intra-predictor 536. The video decodingapparatus 500 is technically characterized in that images are classifiedinto two or more different categories according to preset attributes anda module including each module described above operates in a differentscheme according to the category.

As described above, the image may be a general natural image, an imagecontaining content such as text, graphic, and lines, a depth map, andthe like. Each of these images may have a different attribute andcharacteristic. In order to reduce inefficiency caused by a packagedscheme applied to all images, images are classified into two or morecategories according to preset attributes and input in the presentinvention and modules included in each configuration of the videoencoding apparatus according to the present invention operate indifferent schemes according to the category. Here, an attributeassociated with the input image is not limited to a special specificstandard.

Here, the image characteristics may include information about at leastone of directivity, an edge component distribution, and a color formatof the image, and the two or more categories may be classified toinclude at least one of screen content including text or graphics, anatural image, and a depth map.

The decoder 505 restores a motion vector and a quantized transformedimage by decoding encoded data extracted from a bitstream.

In addition, the decoder 505 may calculate a category of a coding blockclassified into two or more categories based on image characteristicsfor an input image analyzed in units of coding blocks by decoding thebitstream. That is, the decoder 505 can calculate information about thecategory of the coding block by decoding the bitstream and identify acoding block-specific category from the calculated information. Inaddition, the decoder 505 can calculate a color format of the codingblock based on the category of the coding block. That is, the colorformat may be determined in correspondence with the category of thecoding block.

More specifically, the image decoded by the decoder 505 or informationabout the category of the coding block can be found through the decodedbitstream and a unit in which the information about the category isdecoded and acquired may be a frame, slice, or block unit.

In addition, even when the information about the category is notobtained from the decoded bitstream, it is possible to decode a signalby inferring the category information from the restored information.

The inverse quantizer 510 is configured to include two or more inversequantization modules configured to restore a transformed image byinversely quantizing the quantized transformed image transferred fromthe decoder 505 and perform different inverse quantization operationsaccording to categories of the above-described input image (or codingblock). That is, the inverse quantizer 510 can perform the inversequantization by referring to the category of the coding block.

In particular, the inverse quantizer 510 adaptively determine an inversequantization module to be operated according to a category of an inputimage (or coding block) and the inverse quantization module determinedfrom among two or more inverse quantization modules performs inversequantization as in the following example. For example, the first inversequantization module performs the inverse quantization operation of thesame inverse quantization scheme as the first inverse quantizationmodule of the inverse quantizer 240 illustrated in FIG. 2 and the secondinverse quantization module performs the inverse quantization operationof the same inverse quantization scheme as the second inversequantization module of the inverse quantizer 240 illustrated in FIG. 2 ,so that an operation may be optimally performed on an image containingcontent. In addition, the inverse quantizer 510 may further include aninverse quantization module configured to perform the inversequantization operation in a different scheme from the first and secondinverse quantization modules in addition to the first and second inversequantization modules illustrated in FIG. 5 .

For example, the inverse quantizer 510 may perform inverse quantizationon the coding block of the category corresponding to a general naturalimage and skip inverse quantization on the coding block of the categorycorresponding to the screen content or depth map.

The inverse transformer 520 is configured to include two or more inversequantization modules configured to restore an inversely transformedimage by inversely transforming the transformed image restored from theabove-described inverse quantizer 510 and perform different inversetransform operations according to categories of the above-describedinput image (or coding block). That is, the inverse transformer 520 canperform the inverse transform by referring to the category of the codingblock.

In particular, the inverse transformer 520 adaptively determine aninverse transform module to be operated according to a category of aninput image (or coding block) and the inverse transform moduledetermined from among two or more inverse transform modules performsinverse transform as in the following example. For example, the firstinverse transform module performs the same inverse transform operationas the first inverse transform module of the inverse transformer 250illustrated in FIG. 2 and the second inverse transform module performsthe same inverse transform operation as the second inverse transformmodule of the inverse transformer 250 illustrated in FIG. 2 , so that anoperation may be optimally performed on an image containing content. Inaddition, the inverse transformer 520 may further include an inversetransform module configured to perform the inverse transform operationin a different scheme from the first and second inverse transformmodules in addition to the first and second inverse transform modulesillustrated in FIG. 5 .

For example, the inverse transformer 520 can make inverse transforms ona residual signal by inter-prediction and a residual signal byintra-prediction different. That is, it is possible to skip the inversetransform on a residual signal by the intra-prediction on the codingblock of the category corresponding to the screen content or depth mapand perform the inverse transform on a residual signal by theinter-prediction on the coding block of the category corresponding tothe screen content or depth map.

As another example embodiment, the inverse transformer 520 can skip theinverse transform on a residual signal by the inter- or intra-predictionon the coding block of the category corresponding to the screen contentor depth map and perform the inverse transform on a residual signal bythe inter- or intra-prediction on the coding block of the categorycorresponding to the natural image.

The predictor 530 is configured to include a motion predictor 532 usinga restored motion vector, an inter-predictor 534 for inter-prediction,and an intra-predictor 536 for intra-prediction, and generates apredicted image of an input image by performing the intra- orinter-prediction.

The inter-predictor 534 is configured to include two or moreinter-prediction modules configured to generate a predicted block byreferring to one or more past and future images and predicting a currentblock within a current image and perform different inter-predictionsaccording to categories of the above-described input image (or codingblock).

In particular, the inter-predictor 534 adaptively determines aninter-prediction module to be operated according to a category of aninput image (or coding block) and the inter-prediction module determinedfrom among two or more inter-prediction modules including the first andsecond inter-prediction modules performs inter-prediction as in thefirst and second inter-prediction modules illustrated in FIG. 2 .

The intra-predictor 536 is configured to include two or moreintra-prediction modules configured to generate a predicted block(image) by predicting a pixel of a current block using pixels ofpreviously encoded blocks within the current image to be currentlyencoded and pixels of blocks restored after decoding and performdifferent intra-predictions according to categories of theabove-described input image (or coding block).

In particular, the intra-predictor 536 adaptively determines anintra-prediction module to be operated according to a category of aninput image (or coding block) and the intra-prediction module determinedfrom among two or more intra-prediction modules including the first andsecond intra-prediction modules performs intra-prediction as in thefirst and second intra-prediction modules illustrated in FIG. 2 .

In addition, when the input image is a depth map, the intra-predictor536 may perform intra-prediction based on an edge-based contour orregion division and skip the intra-prediction on the depth map.

An another example embodiment of the second intra-predictor, when therestored image is a depth map, depth values of pixels within a currentcoding block can be predicted and generated from restored depth valuesof adjacent pixels of a current block. At this time, a predicted signalcan be created through direct prediction on the depth value itself. Asanother example embodiment, the depth value may be represented by anLUT. In this case, it is possible to use an index corresponding to arelevant depth value in the LUT. That is, the index for the depth valuewithin the current block can be predicted from the index correspondingto the depth value of the adjacent pixel. The predicted depth value andthe depth value of the current block are all represented by LUT indicesand the restored residual signal may be a difference value between theindices.

More preferably, the video encoding apparatus to which the adaptivescheme is applied according to the example embodiment of the presentinvention further includes a filter 540. The filter 540 may beconfigured to include two or more filtering modules configured toperform an operation of reducing distortion caused during encoding of animage restored from the adder 525 to be described later in a givenregion unit and perform different filtering operations according tocategories of the above-described input image (or coding block).

In particular, the filter 540 adaptively determines a filtering moduleto be operated according to a category of an input image (or codingblock) and a filtering module determined from among the two or morefiltering modules including the first and second filtering modulesperforms a filtering operation as in the first and second filteringmodules illustrated in FIG. 2 .

For example, when the input image is a depth map, the filter 540 mayperform down-sampling or up-sampling on the depth map. That is, thefilter 540 may change the resolution of the depth map throughre-sampling on the depth map.

Accordingly, the intra-predictor 536 may perform intra-prediction byreferring to the category of the coding block, the inter-predictor 534may perform inter-prediction by referring to the category of the codingblock, and the filter 540 may perform filtering by referring to thecategory of the coding block.

In addition, the adder 525 may restore an image by adding the restoredresidual image to the generated predicted image, the memory 545 maystore the restored image or the filtered restored image in a given unit,and image information stored in the motion predictor 535 of thepredictor 530 is transferred if necessary.

When the video encoding apparatus to which an adaptive scheme is appliedaccording to an example embodiment of the present invention configuredas described above is used, it is possible to perform efficient videodecoding without loss of important information by restoring imagesaccording to different schemes classified according to categories inwhich attributes of input images are reflected.

That is, the video decoding apparatus 500 according to the exampleembodiment of the present invention may decode an adaptively encodedimage according to the category of the coding block.

The video decoding apparatus 500 may calculate information about thecategory of the coding block as information obtained by analyzing imagecharacteristics of an input image in units of coding blocks and decodethe image using a different method according to the category of thecoding block.

In the present invention, the categories may be classified into twotypes and the types of classified categories are not especially limited.

The classification of the categories may be determined based on imagecharacteristics according to probabilistic and statisticalcharacteristics and a signal model of an image signal such asdirectivity, an edge component distribution, and a color format of theimage.

In particular, screen content including text, graphics, lines, and thelike and a depth map associated with a 3D video or multi-view videosignal have different image characteristics from the general naturalimage. That is, because the screen content may have more edge componentsthan the general natural image, the screen content may have morediscontinuous and sharp image characteristics than the general naturalimage. In addition, the depth map has similar characteristics to thescreen content image and has a different characteristic from the screencontent image in that the depth map includes only a black/white signaland depth values for a background and an object are different.

Accordingly, the screen content, the depth map, and the natural imagemay be included in different categories. The images may be encoded ordecoded by different methods according to the categories.

In addition, it is also important to determine an appropriate colorformat (or chroma format) according to image characteristics in encodingand decoding images. For example, YUV444, YUV422, YUV420, or the likemay be used as the color format.

Accordingly, the video decoding apparatus 500 may calculate the colorformat of the coding block according to the category of the codingblock. For example, decoding may be performed by applying the colorformat of YUV444 to the coding block of the category corresponding tothe screen content and applying the color format of YUV422 or YUV420 tothe coding block of the category corresponding to the general naturalimage.

For example, the depth map may be encoded or decoded in a black/whiteimage format constituted of only Y. In addition, after the depth valueof the depth map is represented in the form of a pre-arranged LUT, it ispossible to perform an encoding or decoding process in the form in whichthe depth value is represented by an index of the LUT without beingdirectly represented.

Accordingly, in first and second modules of functional modulesconstituting the video encoding apparatus and the video decodingapparatus according to the example embodiment of the present invention,the first module may be technology to be used in existing CODECs and thesecond module may cause a signal to pass through without performing anyoperation. For example, in the filtering modules, the first and secondfiltering modules may perform different filtering functions and one ofthe two modules may not perform any filtering operation.

In addition, FIG. 6 is a flowchart illustrating a video decoding methodto which the adaptive scheme is applied according to an exampleembodiment of the present invention.

Referring to FIG. 6 , the video decoding method according to the exampleembodiment of the present invention may be performed by theabove-described video decoding apparatus. Accordingly, theabove-described example embodiment associated with the video decodingapparatus may be applied to the video decoding method.

The video decoding method to which the adaptive scheme is appliedaccording to the example embodiment of the present invention ischaracterized in that an input image (or coding block) is classifiedinto two or more categories according to a preset attribute and a schemeto be performed for each process associated with decoding adaptivelychanges according to the category.

It is possible to calculate a category of a coding block classified intotwo or more categories based on image characteristics for an input imageanalyzed in units of coding blocks by decoding the bitstream (S600).That is, it is possible to calculate information about the category ofthe coding block by decoding the bitstream and identify a codingblock-specific category from the calculated information.

For example, the image characteristics may include information about atleast one of directivity, an edge component distribution, and a colorformat of the image, and the two or more categories may be classified toinclude at least one of screen content including text or graphics, anatural image, and a depth map.

The decoder decodes encoded data extracted from the bitstream andrestores a quantized transformed image and a motion vector using variousdecoding technologies (S610).

After inverse quantization by two or more inverse quantization schemesdifferent from each other according to the category of theabove-described input image (or coding block) using the quantizedtransformed image, a residual image is restored by performing an inversetransform by two or more inverse transform schemes different from eachother according to the category of the input image (or coding block)using the transformed image generated by the inverse quantizer, thepredicted image is added to the restored residual image, and an addingresult is stored in the memory (S620). It is possible to use a referenceimage stored in the memory for motion prediction of the input image ifnecessary thereafter and generate a residual image using an input imageand a predicted image.

For example, it is possible to inversely quantize the coding block ofthe category corresponding to the general natural image and skip theinverse quantization on the coding block of the category correspondingto the screen content or the depth map. In addition, it is possible toskip the inverse transform on the residual signal by theintra-prediction for a coding block of a category corresponding to thescreen content or the depth map and perform the inverse transform on theresidual signal by the inter-prediction for the coding block of thecategory corresponding to the screen content or the depth map.

As another example embodiment, it is possible to skip the inversetransform on the residual signal by the inter- or intra-prediction onthe coding block of the category corresponding to the screen content orthe depth map and perform the inverse transform on the residual signalby the inter- or intra-prediction on the coding block of the categorycorresponding to the general natural image.

Subsequently, the predictor generates a predicted image of the inputimage by performing inter-prediction by two or more inter-predictionschemes different from each other according to a category of an inputimage (or coding block) or performing intra-prediction by two or moredifferent intra-prediction schemes (S630) and restores the image byadding the restored residual image to the generated predicted image(S640).

For example, when the input image is a depth map, the intra-predictionmay be performed based on an edge-based contour or region division andthe intra-prediction for the depth map may be skipped.

In addition, before an input image restored by adding the predictedimage to the restored residual image is stored in the memory, it ispossible to additionally perform filtering processes by two or morefiltering schemes different from each other according to the category ofthe input image (or coding block).

For example, when the input image is a depth map, it is possible toperform down-sampling or up-sampling on the depth map. That is, it ispossible to change the resolution of the depth map through re-samplingon the depth map.

By performing each step for a bitstream including encoded data accordingto the adaptive scheme, it is possible to more efficiently restore animage than the conventional decoding method and reduce an importantinformation loss rate in the decoding process.

It is appreciated that the present invention can be carried out in otherspecific forms without changing a technical idea or essentialcharacteristics by one having ordinary skilled in the art to which thepresent invention pertains to. Therefore, embodiments described aboveare for illustration purpose in all respect but not limited to them. Forexample, each element described as a single type may be distributed, andsimilarly, elements described to be distributed may be combined.

Therefore, it should be understood that the invention is intended tocover not only the exemplary embodiments, but also various alternatives,modifications, equivalents and other embodiments, which may be includedwithin the spirit and scope of the invention as defined by the appendedclaims.

What is claimed is:
 1. A video decoding method performed by a videodecoding apparatus, the method comprising: determining that intra skipcoding is not applied to a current block; obtaining, at least partlybased on the determination that the intra skip coding is not applied tothe current block, information from a bitstream specifying that acontour mode based intra prediction is applied to the current block;deriving, at least partly in response to the information from thebitstream, a first depth value relating to the current block byperforming the contour mode based intra prediction for the currentblock; deriving, based on the first depth value, a first index valueusing a first look up table specifying an index value corresponding to adepth value; deriving a second index value using the first index valueand a residual index value, wherein the residual index value specifies adifference between the first index value and the second index value;obtaining a second depth value relating to the current block based onthe second index value and a second look up table specifying a depthvalue corresponding to an index value; generating the prediction blockfor the current block based on the second depth value; andreconstructing the current block based on a prediction block that isgenerated by the contour mode based intra prediction.
 2. The method ofclaim 1, wherein the second index value is derived by adding theresidual index value to the first index value.
 3. A video encodingmethod performed by a video encoding apparatus, the method comprising:determining that intra skip coding is not applied to a current block;determining, based on the determination that the intra skip coding isnot applied to the current block, that a contour mode based intraprediction is to be applied to the current block; generating, based onthe determination that the contour mode based intra prediction is to beapplied to the current block, information specifying that the contourmode based intra prediction is performed for the current block; encodingthe current block by performing the contour mode based intra predictionfor the current block; and providing a bitstream that includes theencoded current block and the information specifying that the contourmode based intra prediction is performed for the current block, whereinthe contour mode based intra prediction comprises: deriving a firstdepth value relating to the current block by performing the contour modebased intra prediction for the current block; deriving, based on thefirst depth value, a first index value using a first look up tablespecifying an index value corresponding to a depth value; deriving asecond index value using the first index value and a residual indexvalue, wherein the residual index value specifies a difference betweenthe first index value and the second index value; obtaining a seconddepth value relating to the current block based on the second indexvalue and a second look up table specifying a depth value correspondingto an index value; and generating a prediction block for the currentblock based on the second depth value.
 4. The method of claim 3, whereinthe second index value is derived by adding the residual index value tothe first index value.
 5. A non-transitory computer-readablerecoding-medium storing a bitstream which is generated by a videoencoding method, the method comprising: determining that intra skipcoding is not applied to a current block; determining, based on thedetermination that the intra skip coding is not applied to the currentblock, that a contour mode based intra prediction is to be applied tothe current block; generating, based on the determination that thecontour mode based intra prediction is to be applied to the currentblock, information specifying that the contour mode based intraprediction is performed for the current block; encoding the currentblock by performing the contour mode based intra prediction for thecurrent block; and providing a bitstream that includes the encodedcurrent block and the information specifying that the contour mode basedintra prediction is performed for the current block, wherein the contourmode based intra prediction comprises: deriving a first depth valuerelating to the current block by performing the contour mode based intraprediction for the current block; deriving, based on the first depthvalue, a first index value using a first look up table specifying anindex value corresponding to a depth value; deriving a second indexvalue using the first index value and a residual index value, whereinthe residual index value specifies a difference between the first indexvalue and the second index value; obtaining a second depth valuerelating to the current block based on the second index value and asecond look up table specifying a depth value corresponding to an indexvalue; and generating a prediction block for the current block based onthe second depth value.
 6. The non-transitory computer-readablerecoding-medium of claim 5, wherein the second index value is derived byadding the residual index value to the first index value.